package com.wcfsy.wechat.wx.um.entity;

import java.util.ArrayList;
import java.util.List;

import com.wcfsy.wechat.wx.entity.BaseEntity;

public class Menu extends BaseEntity {
	private static final long serialVersionUID = 1L;
	private long parentId;
	private String text;
	private String url;
	private String permisCode;
	private boolean enable;
	private String systemCode;
	private int menuOrder;
	private List<Menu> subMenuList = new ArrayList<Menu>();

	public boolean isTopMenu() {
		return this.parentId == 0L;
	}

	public boolean isLeafMenu() {
		return (this.subMenuList == null) || (this.subMenuList.isEmpty());
	}

	public long getParentId() {
		return this.parentId;
	}

	public void setParentId(long parentId) {
		this.parentId = parentId;
	}

	public String getText() {
		return this.text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getUrl() {
		return this.url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getPermisCode() {
		return this.permisCode;
	}

	public void setPermisCode(String permisCode) {
		this.permisCode = permisCode;
	}

	public boolean isEnable() {
		return this.enable;
	}

	public void setEnable(boolean enable) {
		this.enable = enable;
	}

	public String getSystemCode() {
		return this.systemCode;
	}

	public void setSystemCode(String systemCode) {
		this.systemCode = systemCode;
	}

	public int getMenuOrder() {
		return this.menuOrder;
	}

	public void setMenuOrder(int menuOrder) {
		this.menuOrder = menuOrder;
	}

	public List<Menu> getSubMenuList() {
		return this.subMenuList;
	}

	public void setSubMenuList(List<Menu> subMenuList) {
		this.subMenuList = subMenuList;
	}
}
